Teaching coding in the age of AI

Martina Sladekova & Jennifer Mankin

Disclaimers

  • Not a school-wide approach
  • Slowly converging on a methods-wide approach
  • We’re still learning! (and so is the AI… )
  • Today: an overview of things to be aware of when supporting students’ learning

Generative AI

LLMs: Large language models - sophisticated “prediction machines”

2023:

  • ChatGPT (3.5 or 4)

  • Google Bard

  • Claude

2024:

  • ChatGPT (4o-Mini or 4)

  • Gemini

  • Claude

  • Perplexity.ai

  • You.com

  • Socratic

  • HuggingChat

Generative AI

Link to full conversation

  • How do I calculate descriptive statistics in R?

  • How can I do this using tidyverse?

  • How can I do this using the native pipe operator?

  • I have a dataset called "emoji_df" with variables "thumbs_up_usage" and "generation_group" . Use tidyverse to create a summary table that shows (1) the number of people in each group and (2), mean, sd, and confidence intervals of "thumbs_up_usage". Use the ggplot function "mean_cl_normal" to calculate the confidence intervals.

Over to you:

  1. Do you regularly make use of ChatGPT (or similar)?
  2. Why should we teach coding, and why should our students bother to learn it when AI tools can do everything for them?

Some thoughts

  • Coding is a transferable skills that trains problem solving

  • Copying and pasting prevents understanding

  • Style matters - code should be efficient, robust, and functional

  • The more complex the request the more coding background is required - e.g. complex tasks often need reproducible examples, just like on StackOverflow - and even then, success is not guaranteed.

  • Students who rely solely on pasting prompts into ChatGPT will not be able to progress with dissertation analysis.

  • Potential data protection issues if students upload e.g. dissertation datasets

Current limitations and problems

  • ChatGPT doesn’t know if the code it produces is functional (it just knows what an R code is supposed to look like)

  • Can “hallucinate” and make things up - references, packages, functions.

  • Not reliably available (outages due to server use)

Current limitations and problems

ChatGPT now can search the internet, but doesn’t tend to for coding - improvements in coding driven mostly by version updates.

Assessment and misconduct

Personation in written submissions is where someone, or software (unless explicitly permitted in the assessment guidance from the module convenor) other than the student prepares the work, part of the work, or provides substantial assistance with work submitted for assessment. This includes but is not limited to: AI generated text or responses; purchasing essays from essay banks; commissioning someone else to write an assessment; writing an assessment for someone else…”

[…]

“Cases of pre-meditated intention will usually be major cases. For example, personation where a student submits work described as their own but which has been produced on their behalf by another person, or software (unless explicitly permitted in the assessment guidance from the module convenor) including where someone has been commissioned to write an essay for them, or where the student undertakes to solicit or prepare an assessment on behalf of someone else.”

Assessment and misconduct

AI guidance on staff central

AI guidance for students on skills hub

The baseline position of the University is Sussex is that the use of generative AI material in assessment submissions is prohibited, unless explicitly permitted by the module convenor. 

Our position on methods modules

Module statement 1: Generative AI tools must not be used to generate any materials or content for assessments in this module. In this module, you must not use generative artificial intelligence (AI) to generate any materials or content for your assessment submissions.

and also…

To be clear, we expect all R code to follow the style that we teach, including the choice of methods, packages and functions. AI-generated code typically will not follow our teaching style in ways that may not seem obvious to you but are to us. Code that is inefficient, non-sensical, or otherwise appears to come from sources external to the module will earn lower or no marks.

Therefore…

  • ChatGPT is a tool and it’s okay if students use it to aid their learning - it’s not that different from copying and adapting the code from StackOverflow or other sources.

HOWEVER:

  • Everything students need to know for assessments is in the module materials - know where they are so you can signpost to tutorials. Students will never be asked to complete a task that hasn’t previously be covered (often several times).

  • You should be familiar with the assessment guidance and be able to signpost students to it (usually on Canvas under assessment)

  • We’ll talk about the implications for marking in more detail closer to the assessment time

  • When in doubt - talk to us!